$(function () {
    var userMessage = JSON.parse(localStorage.getItem('userMessage'))
    if (!userMessage) {
        self.location = 'login.html'
    } else {
        var name = userMessage.name
        $('.actor').text(name)
    }
    $('.loginOut').on('click', function () {
        localStorage.clear()
        self.location = 'login.html'
    })
})

